from django.views import View
from django.shortcuts import HttpResponse
from django.shortcuts import  render
from django.http.response import JsonResponse
from mytest.forms.account import RegisterModelForm
from django_redis import get_redis_connection
class RegisterView(View):

    def get(self,request):
        form=RegisterModelForm()
        #链接redis
        # conn=get_redis_connection('default')
        # conn.set('nickname','武佩奇',ex=10)
        # value=conn.get('nickname')
        # print(value.decode())
        return render(request,'account/register.html',{'form':form})

class TestView(View):
    def get(self,request):
        return JsonResponse({'aa':'aaa'})